package com.zq.contoller;

import com.zq.common.base.HttpResult;
import com.zq.entity.User;
import io.swagger.annotations.*;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

@RestController
public class SwaggerController {

    @ApiOperation(notes = "测试swagger",value = "测试swagger")
    @ApiImplicitParams(
            @ApiImplicitParam(name="param1", value="传入json格式",paramType = "body")
    )
    @ApiResponses(@ApiResponse(code =200,message = ""))
    @RequestMapping(value = "operation2", method = RequestMethod.POST)
    public ResponseEntity<HttpResult<UserVO>> testSwagger(){
        HttpResult<UserVO> httpResult = new HttpResult<>();
        httpResult.setData(new UserVO("zhangsan","123456"));
        return ResponseEntity.ok(httpResult);
    }
}
